TL;DR¶
pip install waloviz
apt-get install ffmpeg
import waloviz as wv
wv.extension()
wv.Audio("https://www2.cs.uic.edu/~i101/SoundFiles/CantinaBand3.wav")
Try clicking the spectrogram above, it will start playing :)
Wait, WHAT?!¶
Let me explain:
Whenever I need to do research with audio and using jupyter notebooks I run into a problem, I need to listen to audio files and I need to see their spectrogram (What's a Spectrogram?), but I am running a jupyter notebook, in which listening to the audio is easy, seeing a spectrogram is fiddly, and if I want them synchronized I need to download the audio file and open it in a dedicated editor, such as Adobe Audition, Audacity or Ocenaudio.
WaloViz is my solution for that problem, simply put - it's an audio player with a spectrogram (What's a Spectrogram?) built-in for jupyter notebooks.
That's it.
It's also open-source and has a few advanced features such as exporting as an HTML file and overlaying data, but in essence - it's a tool that was missing for me, so I made it for you :)
What's a Spectrogram?¶
A Spectrogram is a big word, it literally means "A Picture of a Spectrum", or in other words it's a visualization of frequencies.
Each musical note has a base frequency associated with it, meaning that using frequencies is very similar to using musical notes, in that sense a Spectrogram is very similar to a musical spreadsheet, as you go from left to right you go forward in time, and as you go from bottom to top you go higher in pitch (frequency).
In a musical spreadsheet the background is white, and a black spot means that note is played at that moment.
In a Spectrogram the background is black, and a bright yellow spot means that a frequency is played at that moment.
One important difference is that on a Spectrogram the brighter the spot - the louder the sound, and it's a smooth transition from very quiet (dark) to very loud (bright).
Why is it called WaloViz?¶
WaloViz is heavily based on the HoloViz ecosystem for most of it's features, but it was made for audio files, a common audio format is the wav format, so the name is simply wav + HoloViz = WaloViz.